/*
 * gameserver.h
 *
 *  Created on: 2012-4-19
 *      Author: xugp
 */

#ifndef GAMESERVER_H_
#define GAMESERVER_H_

typedef struct __user_t user_t;
typedef struct __connection_t{
	int fd;
	user_t * user;
	time_t activetime;
	struct bufferevent * buf_evt;
} connection_t;

typedef struct __request_t{
	connection_t * pconn;
	char * querystring;

} request_t;


int writebuffer(void * buffer,int len,connection_t * pconn);
int writecmd(connection_t * pconn,char *cmd,char *format,...);

#endif /* GAMESERVER_H_ */
